This is a report of the analysis of gapminder_clean.csv data.

1 Analysis of data from year 1962

 

 

Pearson’s correlation of CO2 emissions and GDP per capita in 1962 was calculated and the resuls are presented below.  

## 
##  Pearson's product-moment correlation
## 
## data:  mydata_1962$`CO2.emissions.(metric.tons.per.capita)` and mydata_1962$gdpPercap
## t = 25.269, df = 106, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.8934697 0.9489792
## sample estimates:
##       cor 
## 0.9260817

 

The correlation of ‘CO2 emissions (metric tons per capita)’ and gdpPercap equals 0.9260817.

The associated p-value equals < 2.2e-16.

2 In what year is the correlation between CO2 emissions and GDP per capita the strongest?

 

Year Correlation
2 1967 0.9387918
1 1962 0.9260817
3 1972 0.8428986
5 1982 0.8166384
6 1987 0.8095531
7 1992 0.8094316
8 1997 0.8081396
9 2002 0.8006421
4 1977 0.7928336
10 2007 0.7204169

 

The correlation between ‘CO2 emissions (metric tons per capita)’ and gdpPercap is the strongest in the year 1967.  

3 What is the relationship between continent and energy use?

 

In order to assess what is the relationship a one-way ANOVA test was performed. Results are presented below.  

##             Df   Sum Sq  Mean Sq F value   Pr(>F)    
## continent    3 30161255 10053752   9.642 0.000334 ***
## Residuals   21 21895723  1042653                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 234 observations deleted due to missingness

 

The p-value is low (p < 0.001), it appears that depending on the continent, there is a difference in energy use.

4 Is there is a significant difference between Europe and Asia with respect to imports of goods and services in the years after 1990?

 

In order to assess what is the relationship a one-way ANOVA test was performed. Results are presented below.

##             Df Sum Sq Mean Sq F value Pr(>F)
## continent    4    536   133.9   0.413  0.799
## Residuals   83  26923   324.4               
## 171 observations deleted due to missingness

 

Because of high (>0.05) p-value it is concluded that there is no significant difference between Europe and Asia with respect to ‘Imports of goods and services (% of GDP)’ in the years after 1990.

5 Which country (or countries) has the highest population density across all years?

 

Country Average.population.density
145 Macao SAR, China 14732.035
163 Monaco 14089.900
101 Hong Kong SAR, China 5153.057
209 Singapore 4361.500
88 Gibraltar 2622.250
23 Bermuda 1132.780

 

Macao region in China has the highest ‘Population density (people per sq. km of land area)’ across all years. It is equal to 14732.035.

6 Which country (or countries) has shown the greatest increase in life expectancy at birth since 1962?

 

## First measurment was taken in 1962 and last one in 2007.

 

The table below shows table ordered in descending order by column containing numerical life expectancy increase.  

Country Life.exp.increase.numerical Life.exp.increase.percentage
150 Maldives 36.91615 195.9
24 Bhutan 33.19895 200.3
238 Timor-Leste 31.08515 189.5
242 Tunisia 30.86076 171.2
182 Oman 30.82310 169.6
171 Nepal 30.59963 185.1

 

The table below shows table ordered in descending order by column containing percentage life expectancy increase.  

Country Life.exp.increase.numerical Life.exp.increase.percentage
24 Bhutan 33.19895 200.3
150 Maldives 36.91615 195.9
151 Mali 25.71346 190.1
238 Timor-Leste 31.08515 189.5
171 Nepal 30.59963 185.1
84 Gambia, The 25.90834 179.3

 

In the Maldives life expectancy has grown by 37 years, what is a growth of 196%. In Bhutan life expectancy has grown by 33 years, what is over 200%.